﻿<!DOCTYPE HTML>
<html>
<head>
    <title>Lotus文件管理平台</title>
    <link href="/Web/CSS/style.css" rel="stylesheet" type="text/css" media="all" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="文件中心,企业云盘" />
    <script src="/Web/js/jquery-1.11.1.min.js"></script>
    <script src="/Web/js/avalon1.47.js"></script>
    <script>

        $(document).ready(function () {
            function login() {
                $.post("/adminapi/login", { user: $("#user").val(), pasd: $("#pasd").val() }, function (result) {
                    if (result.errorMsg == "") {
                        if (result.result == "Y") {
                            setCookie("user", $("#user").val());
                            setCookie("filecode", result.result2);
                            if (isPC()) {
                                location.href = "Html/index.html";

                            } else {
                                location.href = "Html/indexM.html";
                            }
                        } else {
                            alert("账号密码错误!")
                        }
                    }
                })
            }
            $("#pasd").bind('keyup', function (event) {
                if (event.keyCode == "13") {
                    login();
                }
            });
            $("#dl").click(function () {
                login();
            })
        });

        function setCookie (name, value) {
            var Days = 30;
            var exp = new Date();
            exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
            document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path=/";
        }
        function isPC() {
            var userAgentInfo = navigator.userAgent;
            var Agents = ["Android", "iPhone",
                "SymbianOS", "Windows Phone",
                "iPad", "iPod"];
            var flag = true;
            for (var v = 0; v < Agents.length; v++) {
                if (userAgentInfo.indexOf(Agents[v]) > 0) {
                    flag = false;
                    break;
                }
            }
            return flag;
        }
    </script>
</head>
<body>
    <div class="login-form" style="margin-top: 100px">
        <!--<div class="top-login">
				<span>文档中心后台</span>
			</div>-->
        <h1>Lotus文件管理平台V2.0</h1>
        <div class="login-top">
            <form>
                <div class="login-ic">
                    <i></i>
                    <input type="text" value=""   id="user" placeholder="输入用户名" />
                    <div class="clear"></div>
                </div>
                <div class="login-ic">
                    <i class="icon"></i>
                    <input type="password" value="" id="pasd"    placeholder="输入登录口令"  />
                    <div class="clear"></div>
                </div>

                <div class="log-bwn">
                    <input type="button" value="登陆" id="dl" >
                </div>
            </form>
        </div>
        <p class="copy"> <a href="http://www.qijiekeji.com" target="_blank">  © 2018 企捷科技  </a></p>
    </div>
</body>
</html>
